package com.blast.comicsisland.model.topic;

import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;

import java.util.LinkedList;
import java.util.List;

/**
 * Created by ibm on 2015/6/26.
 */
public class InfoContent {
    private List<SpecialDescriptionContent> specialdescriptioncontent;

    public void parseJSON(JSONObject jsonObject){
        if (jsonObject != null){
            try {
                specialdescriptioncontent = new LinkedList<SpecialDescriptionContent>();
                JSONArray array = jsonObject.getJSONArray("specialdescription");
                int length = array.length();
                for (int i = 0; i <length ; i++) {
                    JSONObject object  = array.getJSONObject(i);
                    SpecialDescriptionContent specialDescriptionContent = new SpecialDescriptionContent();
                    specialDescriptionContent.parseJSON(object);
                    specialdescriptioncontent.add(specialDescriptionContent);
                }
            } catch (JSONException e) {
                e.printStackTrace();
            }
        }
    }

    public List<SpecialDescriptionContent> getSpecialdescriptioncontent() {
        return specialdescriptioncontent;
    }

    public void setSpecialdescriptioncontent(List<SpecialDescriptionContent> specialdescriptioncontent) {
        this.specialdescriptioncontent = specialdescriptioncontent;
    }
}
